import bean.RefundTradeBean;
import bean.TicketBean;
import bean.TradeBean;


public class Main {


    public static void main(String[] args) {

        RemoteApiClient.Micropay("", "", "83330203", "2297", 1, 0, "",
                "280152739010044268", Tools.genOrderNumber(2297), "广分测试门店(广分测试门店)", new RemoteApiClient.CallBack<TradeBean>() {
                    @Override
                    public void onSuccess(TradeBean data) throws Exception {
                        System.out.println(data.toString());
                    }

                    @Override
                    public void onFailure(String message) {
                        System.out.println(message);
                    }
                });


        RemoteApiClient.Unifiedorder("", "", "83330203", "2297", "ALIPAY", 1, 0, "",
                "", Tools.genOrderNumber(2297), "广分测试门店(广分测试门店)", new RemoteApiClient.CallBack<TradeBean>() {
                    @Override
                    public void onSuccess(TradeBean data) throws Exception {
                        System.out.println(data.toString());
                    }

                    @Override
                    public void onFailure(String message) {
                        System.out.println(message);
                    }
                });

        RemoteApiClient.Create("", "", "83330203", "2297", "ALIPAY", 1, 0, "",
                "", Tools.genOrderNumber(2297), "广分测试门店(广分测试门店)", "", "", "", new RemoteApiClient.CallBack<TradeBean>() {
                    @Override
                    public void onSuccess(TradeBean data) throws Exception {
                        System.out.println(data.toString());
                    }

                    @Override
                    public void onFailure(String message) {
                        System.out.println(message);
                    }
                });


        //接入方订单号
        //广分订单号(二者选其一)
        //见文档
        RemoteApiClient.Query("", "", "ALIPAY", "", "634040917220623978097278", "1",
                new RemoteApiClient.CallBack<TradeBean>() {
                    @Override
                    public void onSuccess(TradeBean data) throws Exception {
                        System.out.println(data.toString());
                    }

                    @Override
                    public void onFailure(String message) {
                        System.out.println(message);
                    }
                });


        //接入方订单号
        //广分订单号(二者选其一)
        //见文档
        RemoteApiClient.Reverse("","", "ALIPAY", "", "634040917220623978097278", "1",
                new RemoteApiClient.CallBack<TradeBean>() {
            @Override
            public void onSuccess(TradeBean data) throws Exception {
                System.out.println(data.toString());
            }

            @Override
            public void onFailure(String message) {
                System.out.println(message);
            }
        });

        RemoteApiClient.Refund("","", "ALIPAY", "634040917220623978097278", Tools.genOrderNumber(2297), "客户端主动退款", "2297", "83330203", 1,
                new RemoteApiClient.CallBack<RefundTradeBean>() {
            @Override
            public void onSuccess(RefundTradeBean data) throws Exception {
                System.out.println(data.toString());
            }

            @Override
            public void onFailure(String message) {
                System.out.println(message);
            }
        });


        RemoteApiClient.RefundQuery("","", "ALIPAY", "634040917220623978097278", Tools.genOrderNumber(2297), "634040917220623978097278",
                new RemoteApiClient.CallBack<RefundTradeBean>() {
            @Override
            public void onSuccess(RefundTradeBean data) throws Exception {
                System.out.println(data.toString());
            }

            @Override
            public void onFailure(String message) {
                System.out.println(message);
            }
        });

        RemoteApiClient.TicketQuery("","", "ALIPAY", "83330203", "2297", "",
                new RemoteApiClient.CallBack<TicketBean>() {
                    @Override
                    public void onSuccess(TicketBean data) throws Exception {
                        System.out.println(data.toString());
                    }

                    @Override
                    public void onFailure(String message) {
                        System.out.println(message);
                    }
                });

        RemoteApiClient.TicketUse("","", "ALIPAY", "83330203", "2297", "", "",
                new RemoteApiClient.CallBack<TicketBean>() {
                    @Override
                    public void onSuccess(TicketBean data) throws Exception {
                        System.out.println(data.toString());
                    }

                    @Override
                    public void onFailure(String message) {
                        System.out.println(message);
                    }
                });

    }


}


